package com.polaris.live.viewmodel.login

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.polaris.live.common.mvvm.viewmodel.BaseViewModel
import com.polaris.live.manager.AssetsConfigManager
import com.polaris.live.resp.back_resp.AreaCodeResp
import kotlinx.coroutines.launch

/**
 * AreaCodeViewModel
 *
 * @author Created by lucas on 2023/10/26 20:51
 */
class AreaCodeViewModel : BaseViewModel() {

    val allAreaCodeLiveData = MutableLiveData<List<AreaCodeResp>>()

    fun getAllAreaCode() {
        viewModelScope.launch {
            allAreaCodeLiveData.value = AssetsConfigManager.fetchAreaCodes()
        }
    }
}